const Usecase = require('../../shared/usecase/Usecase')

class GetRolePage extends Usecase {
  constructor({ roleRepo, currentUser }) {
    super()
    this.roleRepo = roleRepo
    console.log(currentUser)
  }
  async execute(query) {
    return await this.roleRepo.paginate(
      query,
      {
        include: ['menuList', 'userList'],
      },
      ['name', 'code']
    )
  }
}

module.exports = GetRolePage
